style/profiling tweaks
authorAaron Schulz <aaron@users.mediawiki.org>
Fri, 6 Mar 2009 02:25:28 +0000 (02:25 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Fri, 6 Mar 2009 02:25:28 +0000 (02:25 +0000)
includes/parser/Parser.php

index bff3498..c94cf2e 100644 (file)
@@ -886,7 +886,7 @@ class Parser
 
                $text = $this->doDoubleUnderscore( $text );
                $text = $this->doHeadings( $text );
-               if($this->mOptions->getUseDynamicDates()) {
+               if( $this->mOptions->getUseDynamicDates() ) {
                        $df = DateFormatter::getInstance();
                        $text = $df->reformat( $this->mOptions->getDateFormat(), $text );
                }
@@ -896,7 +896,7 @@ class Parser
 
                # replaceInternalLinks may sometimes leave behind
                # absolute URLs, which have to be masked to hide them from replaceExternalLinks
-               $text = str_replace($this->mUniqPrefix."NOPARSE", "", $text);
+               $text = str_replace($this->mUniqPrefix.'NOPARSE', '', $text);
 
                $text = $this->doMagicLinks( $text );
                $text = $this->formatHeadings( $text, $isMain );
@@ -3299,6 +3299,7 @@ class Parser
         * Fills $this->mDoubleUnderscores, returns the modified text
         */
        function doDoubleUnderscore( $text ) {
+               wfProfileIn( __METHOD__ );
                // The position of __TOC__ needs to be recorded
                $mw = MagicWord::get( 'toc' );
                if( $mw->match( $text ) ) {
@@ -3341,7 +3342,7 @@ class Parser
                } elseif( isset( $this->mDoubleUnderscores['index'] ) ) {
                        $this->mOutput->setIndexPolicy( 'index' );
                }
-
+               wfProfileOut( __METHOD__ );
                return $text;
        }